<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>跑马字设置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/js/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/admin/css/common.css" media="all">
    <script src="/js/layui/layui.all.js"></script>
</head>

<body class="layui-layout-body">
<div class="layui-row">
    <div class="layui-col-md2  formbox " style="margin-top: 10px">

    </div>

    <div class="layui-fluid layui-col-md8 layui-col-sm12 ">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;" class="layui-row">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <div class="layui-form">
                                <div class="layui-form-item">
                                   清理多余电影:(不在节目列表中)
                                </div>
                            </div>
                        </div>



                    </div>



                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <div class="layui-footer" style="left: 0;">
                                <button type="button" class="layui-btn" id="btnAdd"
                                        style="margin-left:10%;width: 100px">
                                    清理
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="layui-col-md2 formbox">

    </div>
</div>
</body>
</html>

<script>
    var $ = layui.$;
    var form = layui.form;


    $("#btnAdd").click(function () {

        layer.confirm("确定要清理吗?",["确定","取消"],function(index){
            layer.close(index);
            $.ajax({
                url: '/system/removeDy',
                async: true,
                success: function (data) {

                    if (data.code == 200) {
                        layer.alert("清理完成,本次清理了:"+data.data+"部电影");
                        return false;
                    }
                    else{
                        layer.msg("没有权限", {icon: 1, time: 1000});
                    }

                }
            });
        });





    });
</script>

